<%@ page language="java" pageEncoding="UTF-8"%>
<%@ page import="my.market.jdbc.dataClass.Goods" %>
<%@ page import="my.market.jdbc.dao.GoodsDao" %>

<%	GoodsDao gd = new GoodsDao();
	Goods good = gd.findGoodById(request.getParameter("id")); %>
<html>
<body>
<form action="${pageContext.request.contextPath}/updateGood" method="post">
	<table>
		<tr>
			<td>商品名称：</td>
			<td><input type="text" name="g_name" value="<%=good.getName() %>" /></td>
		</tr>
		<tr>
			<td>商品类型：</td>
			<td><input type="text" name="g_type" value="<%=good.getType() %>" /></td>
		</tr>
		<tr>
			<td>商品价格：</td>
			<td><input type="text" name="g_price" value="<%=good.getPrice() %>" /></td>
		</tr>
		<tr>
			<td>商品描述：</td>
			<td><input type="text" name="g_description" value="<%=good.getDescription() %>" /></td>
		</tr>
		<tr>
			<td>商品图片：</td>
			<td><input type="text" name="g_image" value="<%=good.getImageLocation() %>" /></td>
		</tr>
		<tr>
			<td>下载地址：</td>
			<td><input type="text" name="g_down" value="<%=good.getDownLocation() %>" /></td>
		</tr>
		<tr>
			<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td>
			<td><input type="submit" value="修改" /></td>
		</tr>
		<tr>
			<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td>
			<td><a href="${pageContext.request.contextPath}/GetAllGoods"><button type="button">返回</button></a>
		</tr>
		<tr><td><input type="hidden" name="g_id" value="<%=good.getId() %>" /></td></tr>
		<tr><td><input type="hidden" name="g_sales" value="<%=good.getSalesnum() %>" /></td></tr>
	</table>
</form>
</body>
</html>